﻿<Window x:Class="NicoApiHelper_CommentTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" DataContext="{Binding Main, Mode=OneWay, Source={StaticResource Locator}}" Loaded="Window_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="20"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="1" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBox x:Name="IDText" Grid.Column="1"/>
            <Label Content="ID" Grid.Column="0"/>
            <Button x:Name="ConnectionButton" Content="接続" Grid.Column="2" Command="{Binding ConnectCommand, Mode=OneWay}"  CommandParameter="{Binding Text, ElementName=IDText}"/>
        </Grid>
        
        <DataGrid Grid.Row="2" FrozenColumnCount="2" ItemsSource="{Binding ChatComments}"/>
        
        <Grid Grid.Row="3">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBox x:Name="SendMessageText" Grid.Column="0" />
            <Button Grid.Column="1" Content="送信" Command="{Binding SendMessageCommand, Mode=OneWay}" CommandParameter="{Binding Text, ElementName=SendMessageText}"  />
        </Grid>
        

    </Grid>
</Window>
